权限组管理API
获取权限组列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| access_group_id | String | Body | 权限组ID |
| access_group_name | String | Body | 权限组名称 |
| access_group_type | String | Body | 权限组类型 system:系统 customized:定制 |
| repeat_mode | String | Body | 重复模式 never:从不 daily:每日 weekly:每周 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| available_days | []String | Body | 可用时间 |
| user_count | Integer | Body | 用户数 |
| created_time | String | Body | 创建时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_access_group_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"access_group_name": "test",
"access_group_id": "arbr2c4b070cc928496198944858b344f",
"access_group_type": "system",
"start_time": "00:00:00",
"finish_time": "23:59:59",
"repeat_mode": "daily",
"available_days": [],
"user_count": 0,
"created_time": "2024-03-29 08:48:18"
}
]
}
失败返回示例
见 接口失败返回
获取权限组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_id | String | Body | 是 | 权限组ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| access_group_name | String | Body | 权限组名称 |
| access_group_type | String | Body | 权限组类型 system:系统 customized:定制 |
| devices | []Object<device> | Body | 设备信息 |
| repeat_mode | String | Body | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 可用时间 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| created_time | String | Body | 创建时间,UTC |
device说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Indoor Monitor:室内机 Guard Phone:管理机 Access Control:门禁 |
| relays | []Object<relay> | Body | 门控信息 |
| security_relays | []Object<relay> | Body | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| relay_name | String | Body | 门控名称 |
| relay_number | String | Body | 门控拨号键值 |
| relay_id | String | Body | 门控ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_access_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"access_group_id": "arbr2c4b070cc928496198944858b344f",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"access_group_name": "test",
"access_group_type": "system",
"start_time": "00:00:00",
"finish_time": "23:59:59",
"repeat_mode": "daily",
"available_days": [],
"created_time": "2024-03-29 08:48:18",
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
}
失败返回示例
见 接口失败返回
获取权限组设备列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Indoor Monitor:室内机 Guard Phone:管理机 Access Control:门禁 |
| relays | []Object<relay> | Body | 门控信息 |
| security_relays | []Object<relay> | Body | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| relay_name | String | Body | 门控名称 |
| relay_number | String | Body | 门控拨号键值 |
| relay_id | String | Body | 门控ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_access_group_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
失败返回示例
见 接口失败返回
创建权限组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_name | String | Body | 是 | 权限组名称 |
| devices | []Object<device> | Body | 是 | 设备信息 |
| repeat_mode | String | Body | 是 | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 否 | 可用时间 |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 楼栋ID |
| device_id | String | Body | 是 | 设备ID |
| mac | String | Body | 是 | MAC地址 |
| relays | []Object<relay> | Body | 是 | 门控信息 |
| security_relays | []Object<relay> | Body | 是 | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| relay_id | String | Body | 是 | 门控ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| access_group_id | String | Body | 权限组ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_access_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_group_name": "test",
"start_time": "00:00:00",
"finish_time": "23:59:59",
"repeat_mode": "daily",
"available_days": [],
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"security_relays": [],
"relays": [
{
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"access_group_id": "a2a621c1ae77040d697bd2134700f57ea"
}
}
失败返回示例
见 接口失败返回
更新权限组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_id | String | Body | 是 | 权限组ID |
| access_group_name | String | Body | 是 | 权限组名称 |
| devices | []Object<device> | Body | 是 | 设备信息 |
| repeat_mode | String | Body | 是 | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 否 | 可用时间 |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 楼栋ID |
| device_id | String | Body | 是 | 设备ID |
| mac | String | Body | 是 | MAC地址 |
| relays | []Object<relay> | Body | 是 | 门控信息 |
| security_relays | []Object<relay> | Body | 是 | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| relay_id | String | Body | 是 | 门控ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_access_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_group_id": "a2a621c1ae77040d697bd2134700f57ea",
"access_group_name": "test",
"start_time": "00:00:00",
"finish_time": "23:59:59",
"repeat_mode": "daily",
"available_days": [],
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"mac": "C10519082089",
"security_relays": [],
"relays": [
{
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除权限组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_id | String | Body | 是 | 权限组ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_access_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_group_id": "arbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除权限组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_groups | []Object<access_group> | Body | 是 | 权限组信息 |
access_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| access_group_id | String | Body | 是 | 权限组ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_access_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_groups": [
{
"access_group_id": "arbr2c4b070cc928496198944858b344f"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
创建权限组账号信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_id | String | Body | 是 | 权限组ID |
| account_id | String | Body | 是 | 账号ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_access_group_account_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_group_id": "arbr2c4b070cc928496198944858b344f",
"residence_id": "rt1adc223cc4b3bedb6bd4742dedcfa52",
"account_id": "avbr2c4b070cc928496198944858b34xc"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除权限组账号信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| access_group_id | String | Body | 是 | 权限组ID |
| residence_id | String | Body | 是 | 住宅ID |
| building_id | String | Body | 是 | 楼栋ID |
| account_id | String | Body | 是 | 账号ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_access_group_account_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"access_group_id": "arbr2c4b070cc928496198944858b344f",
"residence_id": "rt1adc223cc4b3bedb6bd4742dedcfa52",
"building_id": "b21adc223cc4b3bedb6bd4742dedcfa52",
"account_id": "avbr2c4b070cc928496198944858b34xc"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回